<?php
namespace app\shop\validate\company;
use think\Validate;
class Department extends Validate
{
    protected $rule = [
        'id' => 'require',
        'title' => 'require',
        'manager' => 'require'
    ];
    protected $message = [
        'id.require' => '参数错误',
        'title.require' => '部门名称不能为空',
        'manager.require' => '部门经理不能为空'
    ];
    protected $scene = [
        'add' => ['title'],
        'edit' => ['id', 'title'],
        'del' => ['id'],
        'manager' => ['id', 'manager'],
    ];
}